package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 告警记录对象 alert_record
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
public class AlertRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 告警记录ID */
    private Long alertRecordId;

    /** 关联告警配置ID */
    @Excel(name = "关联告警配置ID")
    private Long alertId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;

    /** 关联监测数据ID */
    @Excel(name = "关联监测数据ID")
    private String dataId;

    /** 告警内容（类型+状态） */
    @Excel(name = "告警内容", readConverterExp = "类=型+状态")
    private String alertMessage;

    /** 触发时的监测值 */
    @Excel(name = "触发时的监测值")
    private BigDecimal triggerValue;

    /** 触发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date triggerTime;

    /** 处理状态 */
    @Excel(name = "处理状态")
    private String status;

    /** 处理人 */
    @Excel(name = "处理人")
    private String processedBy;

    /** 处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date processedTime;

    public void setAlertRecordId(Long alertRecordId) 
    {
        this.alertRecordId = alertRecordId;
    }

    public Long getAlertRecordId() 
    {
        return alertRecordId;
    }
    public void setAlertId(Long alertId) 
    {
        this.alertId = alertId;
    }

    public Long getAlertId() 
    {
        return alertId;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setDataId(String dataId) 
    {
        this.dataId = dataId;
    }

    public String getDataId() 
    {
        return dataId;
    }
    public void setAlertMessage(String alertMessage) 
    {
        this.alertMessage = alertMessage;
    }

    public String getAlertMessage() 
    {
        return alertMessage;
    }
    public void setTriggerValue(BigDecimal triggerValue) 
    {
        this.triggerValue = triggerValue;
    }

    public BigDecimal getTriggerValue() 
    {
        return triggerValue;
    }
    public void setTriggerTime(Date triggerTime) 
    {
        this.triggerTime = triggerTime;
    }

    public Date getTriggerTime() 
    {
        return triggerTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setProcessedBy(String processedBy) 
    {
        this.processedBy = processedBy;
    }

    public String getProcessedBy() 
    {
        return processedBy;
    }
    public void setProcessedTime(Date processedTime) 
    {
        this.processedTime = processedTime;
    }

    public Date getProcessedTime() 
    {
        return processedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("alertRecordId", getAlertRecordId())
            .append("alertId", getAlertId())
            .append("deviceId", getDeviceId())
            .append("dataId", getDataId())
            .append("alertMessage", getAlertMessage())
            .append("triggerValue", getTriggerValue())
            .append("triggerTime", getTriggerTime())
            .append("status", getStatus())
            .append("processedBy", getProcessedBy())
            .append("processedTime", getProcessedTime())
            .toString();
    }
}
